package com.yzyz.utils.json;

import java.sql.Date;

import net.sf.json.JsonConfig;

import com.yzyz.bean.route.RouteBean;
import com.yzyz.utils.json.processor.DateProcessor;

public class JSONRoute extends JSONBase {

	public JSONRoute(RouteBean route) {
		super(route);
		super.setLeaf(false);
	}

	private static final long serialVersionUID = -2958227314125201350L;
	
	public static JsonConfig getConfig(){
		String excludes [] = {"config","baseBean"};
		JsonConfig config = new JsonConfig();
		config.registerJsonValueProcessor(Date.class, new DateProcessor());
		config.setExcludes(excludes);
		return config;
	}
	
	public String getPrice() {
		return ((RouteBean)this.getBaseBean()).getPrice();
	}
	
	public String getName() {
		return ((RouteBean)this.getBaseBean()).getName();
	}

}
